package com.hkts.naturalgasauthentication.base.service;

import com.hkts.naturalgasauthentication.base.entity.User;
import com.hkts.naturalgasauthentication.common.vo.SearchVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;


public interface HontUserService extends ManagementBaseService<User,String> {
    /**
     * 通过用户名获取用户
     * @param username
     * @return
     */
    User findByUsername(String username);

    /**
     * 修改昵称
     * @param username
     * @return
     */
    User findByNickname(String username);
    List<User> findByNicknameLike(String username);
    List<User> getUsersByuserIds(List<String> ids);
    /**
     * 通过手机获取用户
     * @param mobile
     * @return
     */
    User findByMobile(String mobile);

    /**
     * 通过邮件和状态获取用户
     * @param email
     * @return
     */
    User findByEmail(String email);

    /**
     * 多条件分页获取用户
     * @param user
     * @param searchVo
     * @param pageable
     * @return
     */
    Page<User> findByCondition(User user, SearchVo searchVo, Pageable pageable);

    /**
     * 通过部门id获取
     * @param departmentId
     * @return
     */
    List<User> findByDepartmentId(String departmentId);

    List<User> getAll();

    String  sendEnd( String[] o);

    public User cutomerfindByMobile(String mobile);

    public User findUserById(String id);

    void sendMessageByUserId(String userId, String msg);

    User updateOpenId(User user);

    boolean findByMobileAndId(String id, String mobile);

    boolean getUserByOpenId(String openId);

    //通过手机和前后台标识查询
    /*public List<User> findByMobileAndFlag(String mobile,Integer flag);

    public List<User> customFind(String mobile,Integer flag);
    public List<User> findByDepartmentIdAndFlag(String departmentId,Integer flag);*/
}
